<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">


<h:body>
	<p:panel id="permis_panel">
		<h:outputText value="User: #{usersBean.selectedUser.login}" />
		<h:inputHidden value="#{usersBean.selectedUser.id}" />

		<p:pickList id="pickList" value="#{permissionsBean.permissions}" var="permissions" itemLabel="#{permissions.name}"
			itemValue="#{permissions}" converter="PermissionsConverter">

			<f:facet name="sourceCaption">Available</f:facet>
			<f:facet name="targetCaption">Current</f:facet>

		</p:pickList>

		<p:commandButton id="permissionsSubmit" value="Submit"
			actionListener="#{usersBean.savePermissions}" oncomplete="permissionsdlg.hide()"/>

		<p:commandButton id="permissionsCancel" value="Cancel" oncomplete="permissionsdlg.hide()" style="margin-top:5px" />
	</p:panel>
</h:body>

</html>